import React from 'react';
import {Link, Outlet, useNavigate} from "react-router-dom";
// import {queries} from "@testing-library/react";

const Index = props => {

    return (
        <div>
            父组件
            <div>
                {/*<Link to={`/detail/${123456}`}>子组件</Link>*/}
                {/*<Link to={`/detail?id=${123456}`}>子组件</Link>*/}
                <Link to={`/detail`} state={{id:"123456"}}>子组件</Link>

                {/*<div onClick={()=>{*/}
                {/*    handle2()*/}
                {/*}}>子组件2</div>*/}
            </div>
            <Outlet></Outlet>
        </div>
    );
};

export default Index;
